home *** CD-ROM | disk | FTP | other *** search
- Path: bignews.cycor.ca!usenet
- From: dgrant@dgrant.peinet.pe.ca (Dennis Grant)
- Newsgroups: comp.sys.amiga.networking
- Subject: Re: Reading Web pages with AREXX
- Date: 4 Feb 1996 20:24:40 GMT
- Organization: Private Internet Connection
- Distribution: world
- Message-ID: <4f34m8$et6@storm.cycor.ca>
- References: <4eoduk$cmi@storm.cycor.ca> <ehb.01om@draco.prima.ruhr.de>
- NNTP-Posting-Host: dgrant.peinet.pe.ca
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- X-NewsSoftware: GRn 2.1 Feb 19, 1994
-
- In article <ehb.01om@draco.prima.ruhr.de> ehb@draco.prima.ruhr.de (Edwin H. Bielawski) writes:
- > In article <4eoduk$cmi@storm.cycor.ca> dgrant@peinet.pe.ca (Dennis Grant) writes:
- > >I had a nifty idea, but I need some help with it.
- > >
- > >I need an AREXX function that takes a URL as an input, and returns the text
- > >of that web page.
- >
- > Have a look to http://Snark.apana.org.au/james/GetURL/
-
-
- I did, and it works! So now I have a little AREXX cron job that pulls the
- current prices of my mutual funds down from the web, and tells me how much
- money I made. :)
-
- Here's the source -
-
- /*Money.rexx*/
- /*A program to calculate the value of mutual funds*/
-
- ADDRESS COMMAND
-
- 'rx geturl.rexx http://www.trimark.com/Trimark/html/fundsdetail.html -output t:trimark'
-
- 'grep HREF="159.html" t:trimark >t:america'
- nil = Open('america','t:america',READ)
- buffer = READLN('america')
- acm = RIGHT(buffer,4)
- total = acm * 561.994
- nil = Close('america')
- 'delete t:america >NIL:'
-
- 'grep HREF="157.html" t:trimark > t:SelBal'
- nil = Open('selbal','t:selbal',READ)
- buffer = READLN('selbal')
- acm = RIGHT(buffer,4)
- grandtotal = total
- total = acm * 379.465
- grandtotal = grandtotal + total
- nil = Close('selbal')
- 'delete t:selbal >NIL:'
-
- 'grep HREF="158.html" t:trimark > t:SelGth'
- nil = Open('selgth','t:selgth',READ)
- buffer = READLN('selgth')
- acm = RIGHT(buffer,4)
- total = acm * 1734.698
- grandtotal = grandtotal + total
- nil = Close('selgth')
- 'delete t:selgth >NIL:'
- 'delete t:trimark >NIL:'
-
- 'rx geturl.rexx http://www.cifunds.com/prices.html -output t:ci'
- 'grep "Latin American Fund" t:ci >t:latin'
- nil = Open('latin','t:latin',READ)
- buffer = READLN('latin')
- acm = RIGHT(buffer,4)
- total = acm * 445.633
- grandtotal = grandtotal + total
- nil = Close('latin')
- 'delete t:ci >NIL:'
- 'delete t:latin >NIL:'
-
- 'rx geturl.rexx http://www.agf.com/fundinfo/prices/cdnpri.html -output t:agf'
- 'grep "ASIAN GROWTH" t:agf >t:asgth'
- nil = Open('asgth','t:asgth',READ)
- buffer = READLN('asgth')
- tacm = LEFT(buffer,128)
- acm = RIGHT(tacm,5)
- total = acm * 533.480
- grandtotal = grandtotal + total
- SAY 'The value today is: $' grandtotal
- nil = Close('asgth')
- 'delete t:agf >NIL:'
- 'delete t:asgth >NIL:'
-
- nil = OPEN('out','down:fundsgraph',APPEND)
- nil = WRITELN('out',grandtotal)
- nil = Close('out')
-
- 'delete t:header#? >:NIL'
- 'delete t:prune#? >NIL:'
-
-
-
- --
- --------------------------
- Dennis Grant
- dgrant@cycor.ca
- http://www.cycor.ca/TCave/
-